import * as PathUtils from "../utils/pathUtils";
import type { SurfaceSetting } from "@model/surfaceSetting";
import { defineStore } from "pinia";

const UseSurfaceSetting = defineStore("surfaceSetting", {
  state() {
    const surfaceSetting = PathUtils.surfaceSettingInit;
    return {
      surfaceSetting: surfaceSetting,
    };
  },
  actions: {
    setSurfaceSetting: function (surfaceSetting: SurfaceSetting) {
      // console.log("surfaceSetting", surfaceSetting);
      // console.log('surfaceSetting',...surfaceSetting)
      this.surfaceSetting.setInfo(surfaceSetting);
      // this.surfaceSetting.setInfo(...surfaceSetting);
      // this.setting = setting;
    },
    getSurfaceSetting: function (): SurfaceSetting {
      return this.surfaceSetting;
    },
  },
  getters: {},
});
export default UseSurfaceSetting;
